Initial Cholesky Decomposition tests using random integer ararys of size n x n that are positive semi definite. Test machine - i3 with 4 GB RAM running Ubuntu 12.04. numchol: Numpy built-in implementation naivchol: naive implementation with lots of serial loops cychol: cython version of the naivchol

In [2]:
n = np.array([100,625,2500, 10000, 22500, 40000, 62500])
numchol = np.array([0.00019097328186,0.0456669330597,0.00850820541382,
                    0.00371909141541,0.0184881687164,0.00554609298706,
                    0.0134701728821])
naivchol = np.array([0.00094199180603,0.00907421112061,0.0873329639435,
                     0.713775157928,2.40018701553,6.53412604332,
                     14.3661940098])
cychol = np.array([0.000155925750732,0.000204086303711,0.000480890274048,
                   0.00231695175171,0.0070219039917,0.0123510360718,
                   0.0294020175934])

In [13]:
figsize(10,8)
plot(n, np.log10(numchol), 'o-',label='numpy')
plot(n, np.log10(naivchol),'o-', label='naive')
plot(n, np.log10(cychol), 'o-',label='cython naive')
xlabel(u'$n$')
ylabel(u'$\log(time)$')
legend(loc=4, fontsize=8)


Out[13]:
<matplotlib.legend.Legend at 0x45faa10>

In [14]:
figsize(10,8)
plot(n, numchol, 'o-',label='numpy')
plot(n, cychol, 'o-',label='cython naive')
xlabel(u'$n$')
ylabel(u'$time(s)$')
legend(loc=4, fontsize=8)


Out[14]:
<matplotlib.legend.Legend at 0x4a79ed0>

In [ ]: